<template>
  <li>
    <p>{{title}}</p>
    <button @click="toggle">切换成{{isok ? '未' : '已'}}完成</button>
    <button @click="remove">删除</button>
  </li>
</template>

<script>
export default {
  props:['id','title','isok'],
  methods: {
    toggle() {
      this.$store.commit('VuexChangeList',this.id)
    },
    remove() {
      this.$store.commit('VuexremoveItem',this.id)
    }
  }
}
</script>

<style>

</style>
